{include file="header.html"}
<div id="rightTop">
    <p>{$lang.user}</p>
    <ul class="subnav">
        <li><span>{$lang.manage}</span></li>
        <li><a class="btn1" href="index.php?app=user&amp;act=add&amp;utype=-1">新增用户</a></li>
    </ul>
</div>

<div class="mrightTop">
    <div class="fontl">
        <form method="get">
            <div class="left">
                <input type="hidden" name="app" value="user"/>
                <input type="hidden" name="act" value="index"/>
                <select class="querySelect" name="field_name">
                    {html_options options=$query_fields selected=$smarty.get.field_name}
                </select>
                <input class="queryInput" type="text" name="field_value" value="{$smarty.get.field_value|escape}"/>
                {$lang.sort_order}:
                <select class="querySelect" name="sort">{html_options options=$sort_options selected=$smarty.get.sort}
                </select>
                <select class="querySelect" name="grade">
                    <option value="">人员等级</option>
                    {html_options options=$grades selected=$smarty.get.grade}
                </select>
                <input type="submit" class="formbtn" value="{$lang.query}"/>
            </div>
            <!--{if $filtered}-->
            <input class="formbtn" onclick='location="index.php?app=user"' type="button"
                   value="{$lang.cancel_query}">
            <!--{/if}-->
        </form>
    </div>
    <div class="fontr">{include file=page.top.html}</div>
    <div class="clear:both;"></div>
</div>
<div class="tdare">
    <table width="100%" cellspacing="0" class="dataTable">
        <!--{if $users}-->
        <tr class="tatr1">
            <td width="20" class="firstCell"><input type="checkbox" class="checkall"/></td>
            <td>{$lang.user_name}</td>
            <td>人员等级</td>
            <td>人员类型</td>
            <td>手机</td>
            <td><span ectype="order_by" fieldname="reg_time">{$lang.reg_time}</span></td>
            <td><span ectype="order_by" fieldname="last_login">{$lang.last_login}</span></td>
            <td>{$lang.if_admin}</td>
            <td>是否禁用</td>
            <td class="handler">{$lang.handler}</td>
        </tr>
        <!--{/if}-->
        <!--{foreach from=$users item=user}-->
        <tr class="tatr2">
            <td class="firstCell"><!--{if !$user.if_admin}--><input type="checkbox" class="checkitem" value="{$user.user_id}"/><!--{/if}--></td>
            <td>{$user.user_name|escape}</td>
            <td>{$user.grade}</td>
            <td>{$user.d_value|default:-}</td>
            <td>{$user.phone_tel|default:-}</td>
            <td>{$user.reg_time|date|default:-}</td>
            <td><!--{if $user.last_login}-->{$user.last_login|date}<!--{/if}--><br/>
                {$user.last_ip}
            </td>
            <td><!--{if $user.if_admin}-->  {$lang.yes}
                <!--{else} {if $user.type==0}--><a href="index.php?app=admin&amp;act=add&amp;id={$user.user_id}"
                                                   onclick="parent.openItem('admin_manage', 'user');">{$lang.admin}</a>
                <!-- {else}否  {/if} {/if}-->
            </td>
            <td>
                <!-- {if $user.del} -->
                <img src="{res file=style/images/positive_enabled.gif}" ectype="inline_edit" fieldname="del"
                     fieldid="{$user.user_id}" fieldvalue="1" title="{$lang.editable}"/>
                <!--{else}-->
                <img src="{res file=style/images/positive_disabled.gif}" ectype="inline_edit" fieldname="del"
                     fieldid="{$user.user_id}" fieldvalue="0" title="{$lang.editable}"/>
                <!-- {/if} -->
            </td>
            <td class="handler">
      <span style="width: 100px">
          <!--{if !$user.if_admin}-->
            <a href="index.php?app=user&amp;act=edit&amp;id={$user.user_id}">{$lang.edit}</a>

          |<a href="javascript:drop_confirm('{$lang.drop_confirm}', 'index.php?app=user&amp;act=drop&amp;id={$user.user_id}');">{$lang.drop}</a>
          <!-- {/if} -->
          <!-- {if $user.store_id} -->
        | <a href="index.php?app=store&amp;act=edit&amp;id={$user.store_id}"
             onclick="parent.openItem('store_manage', 'store');">{$lang.store}</a>
          <!-- {/if} -->
      </span>
            </td>
        </tr>
        <!--{foreachelse}-->
        <tr class="no_data">
            <td colspan="10">{$lang.no_data}</td>
        </tr>
        <!--{/foreach}-->
    </table>
    <!--{if $users}-->
    <div id="dataFuncs">
        <div id="batchAction" class="left paddingT15"> &nbsp;&nbsp;
            <input class="formbtn batchButton" type="button" value="{$lang.drop}" name="id"
                   uri="index.php?app=user&act=drop" presubmit="confirm('{$lang.drop_confirm}');"/>
        </div>
        <div class="pageLinks">{include file=page.bottom.html}</div>
        <div class="clear"></div>
    </div>
    <!--{/if}-->
</div>
{include file="footer.html"}